<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        .red {
            color: darkred;
        }
        .thin {
            font-weight: 200;
        }
        .italic {
            font-style: italic;
        }
        .active {
            letter-spacing: 0.5em;
        }
    </style>
    <script src="./lib/vue2.4.4.js"></script>
</head>

<body>
    <div id="app">
        <!-- <h1 class="red thin">这是一个很大的H1</h1> -->

        <!-- <h1 :class="['thin', 'italic', 'red']">这是一个很大的H1</h1> -->

        <!-- <h1 :class="['thin', 'italic', 'red', flag?'active':'']">这是一个很大的H1</h1> -->

        <!-- <h1 :class="['thin', 'italic', 'red', {'active':flag}]">这是一个很大的H1</h1> -->

        <!-- <h1 :class="{thin:true,italic:false,red:true,active:flag}">这是一个很大的H1</h1> -->

        <h1 :class="classObj">这是一个很大的H1</h1>
    </div>

    <script>
        var vm = new Vue({
            el: '#app',
            data: {
                flag: true,
                classObj: {thin:true,italic:false,red:true,active:this.flag}
            },
            methods: {
            }
        });
    </script>
</body>

</html>